package com.gotloop.dao;

import java.util.List;

import com.google.appengine.api.datastore.Key;
import com.gotloop.jdo.Comment;

/**
 * Comment Data Access Object.
 * @author jibhaine
 *
 */
public interface CommentDAO extends AbstractDAO<Comment, Key> {
	
	/**
	 * Gets every Loop comments.
	 * @param startIndex		first comment index.
	 * @param commentsPerPage	number of wanted comments
	 * @return					a list of LoopComment
	 */
	List<Comment> getAllLoopComments(int startIndex, int commentsPerPage);

	/**
	 * Gets every comments made on a given Loop.
	 * @param urlTitle			url of the Loop
	 * @param startIndex		first comment index
	 * @param commentsPerPage	number of wanted comments
	 * @return					a list of LoopComment
	 */
	List<Comment> getCommentsByLoops(String urlTitle, int startIndex, int commentsPerPage);


	/**
	 * Gets every comments made by an User.
	 * @param userName			name of User
	 * @param startIndex		first comment index
	 * @param commentsPerPage	number of wanted comments
	 * @return					a list of LoopComment
	 */
	List<Comment> getCommentsByUser(String userName, int startIndex, int commentsPerPage);
	
		
}
